package com.kakarote.ids.provider.entity.VO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

@ApiModel("获取tokenBO")
public class TokenVO implements Serializable {
	@ApiModelProperty("token")
	private String accessToken;
	@ApiModelProperty("过期时间")
	private Integer expiresIn;

	public void setAccessToken(String accessToken) {
		/* 15 */ this.accessToken = accessToken;
	}

	@ApiModelProperty("refreshToken")
	private String refreshToken;
	@ApiModelProperty("token类型")
	private String tokenType;
	@ApiModelProperty("作用域")
	private String scope;

	public void setExpiresIn(Integer expiresIn) {
		this.expiresIn = expiresIn;
	}

	public void setRefreshToken(String refreshToken) {
		this.refreshToken = refreshToken;
	}

	public void setTokenType(String tokenType) {
		this.tokenType = tokenType;
	}

	public void setScope(String scope) {
		this.scope = scope;
	}

	public boolean equals(Object o) {
		if (o == this)
			return true;
		if (!(o instanceof TokenVO))
			return false;
		TokenVO other = (TokenVO) o;
		if (!other.canEqual(this))
			return false;
		Object this$expiresIn = getExpiresIn(), other$expiresIn = other.getExpiresIn();
		if ((this$expiresIn == null) ? (other$expiresIn != null) : !this$expiresIn.equals(other$expiresIn))
			return false;
		Object this$accessToken = getAccessToken(), other$accessToken = other.getAccessToken();
		if ((this$accessToken == null) ? (other$accessToken != null) : !this$accessToken.equals(other$accessToken))
			return false;
		Object this$refreshToken = getRefreshToken(), other$refreshToken = other.getRefreshToken();
		if ((this$refreshToken == null) ? (other$refreshToken != null) : !this$refreshToken.equals(other$refreshToken))
			return false;
		Object this$tokenType = getTokenType(), other$tokenType = other.getTokenType();
		if ((this$tokenType == null) ? (other$tokenType != null) : !this$tokenType.equals(other$tokenType))
			return false;
		Object this$scope = getScope(), other$scope = other.getScope();
		return !((this$scope == null) ? (other$scope != null) : !this$scope.equals(other$scope));
	}

	protected boolean canEqual(Object other) {
		return other instanceof TokenVO;
	}

	public int hashCode() {
		int PRIME = 59;
		int result = 1;
		Object $expiresIn = getExpiresIn();
		result = result * 59 + (($expiresIn == null) ? 43 : $expiresIn.hashCode());
		Object $accessToken = getAccessToken();
		result = result * 59 + (($accessToken == null) ? 43 : $accessToken.hashCode());
		Object $refreshToken = getRefreshToken();
		result = result * 59 + (($refreshToken == null) ? 43 : $refreshToken.hashCode());
		Object $tokenType = getTokenType();
		result = result * 59 + (($tokenType == null) ? 43 : $tokenType.hashCode());
		Object $scope = getScope();
		return result * 59 + (($scope == null) ? 43 : $scope.hashCode());
	}

	public String toString() {
		return "TokenVO(accessToken=" + getAccessToken() + ", expiresIn=" + getExpiresIn() + ", refreshToken="
				+ getRefreshToken() + ", tokenType=" + getTokenType() + ", scope=" + getScope() + ")";
	}

	public String getAccessToken() {
		return this.accessToken;
	}

	public Integer getExpiresIn() {
		return this.expiresIn;
	}

	public String getRefreshToken() {
		return this.refreshToken;
	}

	public String getTokenType() {
		return this.tokenType;
	}

	public String getScope() {
		return this.scope;
	}

	public TokenVO() {
	}

	public TokenVO(String accessToken) {
		this.accessToken = accessToken;
		setExpiresIn(Integer.valueOf(7200));
		setScope("base");
		setTokenType("Bearer");
	}
}
